home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Compute! Gazette 1984 September
/
1984-09.d64
/
disk tricks 2
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-09-20
|
851b
|
19 lines
100 sys65517:ifpeek(781)=22thenmt$="":tm$="":goto500
110 mt$="":tm$=""
500 print"[147]"mt$" warning":print" this program will "
501 print" change the disk id.":print" please make sure that"
502 printtm$" the gazette disk[146] is":print" is not in the drive."
1000 fori=1to7000:next
1999 rem end: rem program 2: change disk id
2000 input "[147]new disk id";id$
2010 if len(id$) <> 2 then 2000: rem reject improper length id
2020 open 15,8,15,"i": rem open disk command channel
2030 open 8,8,8,"#": rem open direct access channel
2040 print#15, "u1:"8;0;18;0: rem read track 18, sector 0 into channel 8 buffer
2050 print#15, "b-p:"8;162: rem move buffer-pointer to first byte of disk id
2060 print#8, id$;: rem put new id in channel 8 buffer, replacing old id
2070 print#15, "u2:"8;0;18;0: rem store buffer to disk
2080 close 8: rem close direct access channel
2090 close15: rem close command channel
2100 rem goto 100: rem restart display t&s program if appended